﻿using Dispatcher.Core.Models;
using MiniFox.Infrastructure;
using MiniFox.Resources;
using System;
using System.ComponentModel.DataAnnotations;

namespace Dispatcher.Core.Wechat.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class WechatSendRequest : SendRequest
    {
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "发消息帐户", ShortName = "发消息帐户")]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        public string AccountName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public MessageType MessageType
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "链接地址", ShortName = "链接地址")]
        public string Url { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "图片地址", ShortName = "图片地址")]
        public string PictureUrl { get; set; }

        public string Body { get; internal set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public enum MessageType
    {
        Text,
        Card,
        News,
        Markdown
    }
}
